package com.mumu.system.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mumu.system.model.AuthUser;
import com.mumu.system.service.UserService;
import com.mumu.system.vo.AuthUserVO;

@Controller
@RequestMapping("/User")
public class UserController {

	@Autowired private UserService userService;
	
	@ResponseBody
	@RequestMapping("/selectAll")
	public List<AuthUser> userService(){
		return userService.selectAll();
	};
	
	@ResponseBody
	@RequestMapping("/getUserById")
	public AuthUserVO getUserById(Integer id) {
    	AuthUserVO authUserVO = userService.getUserById(id);
        return authUserVO;
    }

}
